// 这里开始使用 pinia
import { defineStore} from "pinia";
import {ref} from 'vue'
import { UserlistModel } from '@/models/userlist'
// 引入api
import { UserListApi } from '@/util/api'

// 这里进行请求
export const useUserListStore = defineStore('userlist', ()=> {
    const user_list_list = ref<UserlistModel[]>([])

    const getUserListData = async () => {
        const result = await UserListApi()

        user_list_list.value = result.data
    }

    return {
        user_list_list,
        getUserListData
    }
})
